home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.348 < prev    next >
Encoding:
Text File  |  1996-02-12  |  27.7 KB  |  715 lines

  1. Frequently Asked Questions (FAQS);faqs.348
  2.  
  3.  
  4.  
  5. ANSWER: Right now there are uemacs-3.11, elvis-1.4 (1.5).
  6. Gnu Emacs is there, read the section devoted to it in the 4th part of
  7. this FAQ. Also the port of mg (micro gnu) has been done and can be
  8. found at least at athos.rutgers.edu (128.6.4.4)
  9. in pub/linux, mg is the binary and mg.tar.Z is the sources file. You
  10. can also find a PD ed, and elvis has an ex mode. Finnally there are
  11. joe, vile-3.11, elle (Elle Looks Like Emacs), Xedit and aXe.
  12.  
  13. QUESTION: Does there exist a printer package for Linux?
  14.  
  15. ANSWER: (R. Miller) Yes.  The "plp" package is currently available
  16. under the directory [/pub/linux]/BETA/plp on tsx-11 and its mirrors.
  17. You may also print things manually like so:  cat filename > /dev/lp1
  18. (Note that though "/dev/lp0" exists, most people find that their
  19. printer is on /dev/lp1.  Use whatever the kernel says that it detects
  20. in the boot-up messages.)
  21.  
  22.  
  23. QUESTION: How do I make swapping work?
  24.  
  25. ANSWER: Quite simply, you need the swapon and the mkswap binaries.
  26. Then you can choose between a swap partition or a swap file.
  27. The mkswap is used to write the "swap signature", whilst the swapon
  28. binary is to activate the swapping.
  29.  
  30. First of all you need a partition :), I assume it's the second of your
  31. first disk namely /dev/hda2, and it's 10MB big
  32. A) swap partition:
  33. you have to indicate it's a swap area, this is done via mkswap
  34. (instead of mkfs) which needs the name of the partition and the size
  35. in blocks (a block is 1Ko big); the optional -c flag is for bad block
  36. checking. So for our example you should perform:
  37. mkswap [-c] /dev/hda2 10000
  38. Then you need to indicate that you want linux to use the swap area,
  39. this is done via swapon. In general it is set in the /etc/rc file,
  40. just put the following entry:
  41. /bin/swapon /dev/hda2
  42. It can also be achieved via the /etc/fstab file
  43. B) swap file:
  44. The process is quite close; you need a partition, and a swap file.
  45. Assume that I prefer a swap area of 4MB (I want to keep some place in
  46. /dev/hda2). I need first to "dd" the file.
  47. dd if=/dev/hda2 of=/swap_file bs=1024 count=4096
  48. bs stands for block size, and count is the number of blocks
  49. then I have to put the "swap signature" on that file:
  50. mkswap /swap_file 4096
  51. At this point, you should 'sync', just to be sure the signature is
  52. effective. And finally add an entry in the rc file:
  53. /bin/swapon /swap_file
  54.  
  55.  
  56. QUESTION: When I boot I get one of the following messages:
  57. "Unable to find swap signature" or "Bad swap-space bitmap"
  58.  
  59. ANSWER: You probably forgot to make your swap-device, use the mkswap
  60. command.
  61.  
  62.  
  63. QUESTION: How do I know if it is swapping?
  64.  
  65. ANSWER: You will notice it :)) First of all, Linux tells you at boot
  66. time, "Adding swap: XXX pages of swap space", and if you start running
  67. out of memory, you will notice that the disk will work overtime, and
  68. things slow down. Generally a 2Meg RAM will make the system swap
  69. constantly while running gcc, 4 Meg will swap occasionnaly when
  70. optimizing big files (and having other things active, such as make).
  71. Also, the command 'free' (from the ps package) reports total enabled
  72. swap space and current swap use.
  73.  
  74.  
  75. QUESTION: How is it possible to remove a swap file?
  76.  
  77. ANSWER: Simply perform a rm on that file, and remove the swapon of
  78. your /etc/rc file.
  79.  
  80.  
  81. QUESTION: How is it possible to remove a swap device?
  82.  
  83. ANSWER: mkfs the device, and remove the swapon of your /etc/rc file.
  84.  
  85. QUESTION: How much swap space do I need ?
  86.  
  87. ANSWER: Linux does not perform real swapping, it's rather paging (see
  88. below for a more complete explanation). The swap area is *added* to
  89. the memory and can be viewed as virtual memory, so choose the size you
  90. need, example:
  91.  
  92.         8MB RAM + 6MB swap => 14MB virtual memory
  93.  
  94. QUESTION: Could someone explain the swap process on Linux?, is it
  95. swapping or paging ?
  96.  
  97. ANSWER: (Linus) Linux uses swap as /additional/ memory, one page of
  98. the swap-space is used for the good-page bitmap and the swapspace
  99. signature.
  100. In fact Linux does only paging, no swaping in the meaning "write out
  101. one whole process to disk".
  102. The reason it's called swapping is that Linux used paging for memory
  103. management on a low level since the very beginning, but didn't page to
  104. disk at all until 0.12.
  105.  
  106. QUESTION: Is demand paging different from paging and How ?
  107.  
  108. ANSWER: (Linus) Demand-paging is really "demand loading of
  109. executables" and is totally independent of the page-swapping
  110. algorithms, although they have similarities. When Linux strts up a
  111. process, no actual code space is loaded: I let the page exceptions
  112. load in the executable as needed. Thus Linux demand-loads the code and
  113. initialized data it needs.
  114. Demand-loading has very good points: (a) it simplifies the exec system
  115. call; (b) it means page sharing between that have excuted the same
  116. file is easy to implement; (c) it cuts down on the amount of memory
  117. required. When Linux runs out of real memory, it starts to lock for
  118. pages it can swap out, but if it notices that the page is clean, it
  119. just forgets about it, and demand-loads it when it's needed again.
  120. Thta means that swap-file isn't needed as much, especially when
  121. running big binaries such as gcc, where the code-pages can be
  122. demand-loaded as you wish.
  123.  
  124. Point (c) means that even without any swap space, you can usually run
  125. slightly larger programs that your memory setup would actually permit.
  126. I've noticed this while running X and doing a kernel compilation +
  127. something else wshen I've forgotten to turn on swapping: free reports
  128. 0 page available but things still work, although performance is
  129. slightly down...
  130.  
  131. QUESTION: Is there any way to tell how much swap space you are using
  132. or have left?
  133.  
  134. ANSWER: The free program provided with the ps package handles this.
  135.  
  136.  
  137. QUESTION: I have a 2Megs box, but "free" reports only 1Meg why?
  138.  
  139. ANSWER: (Linus:) "free" doesn't concern with the memory the kernel has
  140. allocated for itself. In other words what you see is the *user* memory
  141. available. The kernel has taken the low 1Meg for it's use (~250Ko for
  142. it and the rest for buffer cache and kernel data structures); for big
  143. memory machine it could be even 2Megs.
  144.  
  145. QUESTION: What tape drives work with Linux ?
  146.  
  147. ANSWER: (24 sept. P. Riipinen)
  148. - There is a working QIC-02 device driver for Linux, supporting (at
  149.   least) Everex/Wangtek cards.
  150. - There are additional patches for the QIC-02 to support Archive
  151.   SC402/499R. You can find them in /pub/linux/alpha/qic-02 at tsx-11
  152.   There are some bugs in the driver but you can backup.
  153. - Newer drivers are all SCSI, so check the SCSI section in this FAQ.
  154.  
  155. QUESTION: Is there only the %$#@ keyboard ?
  156.  
  157. ANSWER: There are Dannish, Finnish, French, German, Uk, US and DVORAK
  158. keyboards. Set it in the main Makefile of the kernel sources, then
  159. (re)compile the kernel again. Make sure the files in kernel/chr_drv
  160. directory are recompiled.
  161.  
  162.  
  163. QUESTION: (special FINNISH/US) I booteed up with the new image and
  164. everything work except that some keyboard keys produce wrong
  165. characters. Does anyone know what is happening?
  166.  
  167. ANSWER: Since 0.95a images are US product (and so are US-keyboard
  168. oriented), BUT linux sources are FINNISH product, and so the default
  169. keyboard is set to be FINNISH. The solution is in the previous Q/A.
  170.  
  171.  
  172. QUESTION: Does there exist shared libs ?
  173.  
  174. ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92)
  175.  
  176. The shared library under Linux started at 0.12. Peter MacDonald
  177. collaborating with Linus made the first generation of shared library,
  178. which is the base of the current classic shared library.
  179.  
  180. The kernel support of shared library under Linux is system call
  181.  
  182. extern int uselib (const char *__filename);
  183.  
  184. which loads an executable image with fixed entry point into memory,
  185. just like the ordinary executables.
  186.  
  187. In crt0.s, a function which can find out if and which shared images
  188. are needed and loads them is invoked before `main ()' is called if
  189. necessary. David Engel and I developed a way to tell the loader which
  190. shared images have to be loaded, utilizing the similar technique used
  191. in global constructor in g++ 2.x with the help from GNU binary
  192. utilities.
  193.  
  194. In the classic Linux shared library, we build a big executable image
  195. for several libraries and make sure no external variables outside of
  196. the participating libraries are referenced. Then we can get the
  197. absolute addresses of all the global variables defined in the
  198. libraries used to build that executable image. After that, we make a
  199. stub library for each participating library which just has the
  200. absolute addresses of all the global variable in it.
  201.  
  202. For each shared image, there must be one and only one file, usually
  203. called, __shared.o, which defines a global variable containing
  204. version, name and entry point of the shared image, and a dummy global
  205. data. Among those libraries used to build the shared image, there must
  206. be one library which will always be referenced whenever any other
  207. library is referenced. We put `__shared.o' into the stub library for
  208. that library and add a declaration for the dummy global data defined
  209. in `__shared.o' which will make sure `__shared.o' will always be linked
  210. in when any participating libraries are linked.
  211.  
  212. In gcc 2.2.2d, jump table, developed by David Engel, was introduced in
  213. the shared library. At the beginning of each shared image, there is
  214. a table in which every library function has a fixed entry address and
  215. the instruction at that address is a jump which will lead to the
  216. real library function. So we can change the library function without
  217. changing the corresponding entry address of the jump table. For the
  218. global data we put them at the beginning of data section of the shared
  219. image. We have to separate them from text code and link them in fixed
  220. order. It is very hard to maintain the same addresses for the global
  221. data when library is changed. After the global data are set up properly
  222. and some spaces are left for possible future changes (that is a very
  223. tough procedure.), it isn't too difficult to maintain.
  224.  
  225. In the current implementation, only libc.a, libcurses.a, libdbm.a,
  226. libtermcap.a and libm.a are built with jump table. The global data in
  227. X11 libraries are too complicated to make jump table such that their
  228. addresses won't change when there is a change in X11 libraries. It's
  229. not apparent yet that the benefits gained from a jump table version of
  230. the X libraries would offset the effort required to set it up and
  231. maintain it unless we get some cooperation from X Consortium, which
  232. is very unlikely. But they are linked with jump table version of
  233. libc.a and libm.a. That means they don't have to be relinked when
  234. there is a modification in libc.a or libm.a.
  235.  
  236.  
  237. QUESTION: Does Linux work for SCSI drives?
  238.  
  239. ANSWER: Yes since v0.96. At headrest.colorado.edu in /pub/scsi, you
  240. will find the last SCSI alpha/beta version and also a special SCSI
  241. FAQ, read it, it  contains the latter information than the one provided
  242. in the SCSI section. You should, also, contact the linux-scsi list or
  243. directly drew@cs.colorado.edu
  244.  
  245.  
  246. QUESTION: Linux is supposed to work with ESDI drive. However I have
  247. trouble with my Magtron MT-4115E (Joincom controler), any clue?
  248.  
  249. ANSWER: (Linus) Some harddisk don't like linux (even though they
  250. should). Maybe not a bug but a deficiency.
  251. (Mika) I had to remove the printk "unexpected hd interrupt" statement
  252. in hd.c because I was getting so many of those messages. Be warned
  253. that if there is any read error the system just hangs, even the
  254. ctrl-alt-del won't work. You should be able to use your ESDI drives if
  255. you could live with those nuisances.
  256.  
  257. QUESTION: How does one go about applying a patch to Linux ?
  258.  
  259. ANSWER: (Drew Eckhardt) In the unix world most of distribution are in
  260. source form. This includes the operating system. To apply a patch, you
  261. apply it with the 'patch' program to the affected sources. The patch
  262. program takes as input the differences between the old and the new
  263. version. After patching you need to recompile the sources.
  264.  
  265. Assume I want to apply a patch enclosed in the file XXX. First of all
  266. I will look at the top of XXX, where the file affected is identified.
  267. This may have aleading path attached to it. Either cd out to the
  268. "root" of the patch, ie if I see
  269. linux/kernel/blk_drv/blk.h
  270.  
  271. I would cd into /usr/src
  272. (assuming it's the place where I can find linux/kernel...)
  273. and then patch as follows
  274. patch -p0 < whatever_place/XXX
  275.  
  276. or, you can specify a number of path components to strip from the
  277. path. If I am in the blk_drv directory patching would be
  278. patch -p3 < whatever_place/XXX
  279.  
  280.  
  281. QUESTION: There are a lot of patches available (ps patch, NFS patches,
  282. CD-ROM patches ...) can I be fairly confident the subsequent patches will
  283. work?
  284.  
  285. ANSWER: This is not true yet for the current version; but it will be
  286. so I kept it :)
  287. No you can't, patching is a real beta tester art :)).  People are not
  288. working on the same patched release, so you have to check if the
  289. patches you already applied works on the same kernel part, if not,
  290. /great/, just apply them. If yes, check if there is an order, patch
  291. creator knows that, and (should) try to warn patch user (in other
  292. words: beta tester) otherwise you should edit the patch files (and
  293. possibly make a brief note to others on this list/newsgroup or even a
  294. cdiff) before applying them, another solution is to keep cool and wait
  295. for the next version of Linux where, in general, the modifications
  296. have been done but this behavior is /not/ Linux helpful.
  297.  
  298.  
  299. QUESTION: I got the patches on some ftp sites, and applied them to the
  300. kernel and tried to compile. It didn't !!. Are the patches buggy?
  301.  
  302. ANSWER: Before remake, just do a make clean in the directories
  303. involved by the patches. This will force a rebuild of the .o and .a
  304. files.
  305. If you have a RCS running on your source tree, did you checked a
  306. patched version of the files changed before /any/ CO either by you or
  307. make
  308.  
  309. Finally, make sure the patches succeded. Normally, failed patches on a
  310. file FILE will leave a FILE# file. Moreover you will get a "chunk
  311. failed" message. It is possible to capture the output while patching,
  312. with the following:
  313.  
  314.     patch -p0 < patchfile | 2>&1 patch.result | more
  315.  
  316.  
  317. QUESTION: What is VFS?
  318.  
  319. ANSWER: (Ted) Linux 0.96 already has Virtual FileSystem, which means
  320. that it acts as a filesystem switch. It makes it easy for someone to
  321. design another filesystem format and include it in the Linux kernel
  322. along with the standard minix filesystem format. So it /enables/
  323. someone to design a robust filesystem which would have some nice
  324. properties (no 14 chars file name limitation, nor 64Meg limit), and
  325. could be included in the kernel in such a way that both the Minix and
  326. the new one could be mounted at the same time. This solves the
  327. uncompability problem; since the root disk could still use the Minix
  328. filesystem, while the hardisk could be using the new one.
  329.  
  330.  
  331.  
  332. QUESTION: What's about Bus Mice ?
  333.  
  334. ANSWER: (Nathan I. Laredo) Since the Linux v0.96c-pl2 the kernel does
  335. support LOGITECH and BUS MICE
  336. If you are unsure that you have a bus mouse or not, check to see if
  337. your mouse card has a selection for a sample rate switchable between
  338. 30Hz and 60Hz (or possibly 25/50Hz), if it does not, then it is NOT a
  339. true  bus mouse (InPort mice for example will not work with this
  340. driver).
  341. To create a bus mouse device:
  342. mknod /dev/mouse c 10 0
  343.  
  344.  
  345. QUESTION: What's about TeX ?
  346.  
  347. ANSWER: The primary site for Linux TeX is 129.78.66.1, this is
  348. P. Williams' site in Australia. The stuff at tsx-11 was posted by
  349. T. Dunbar  who does support/maintain the dvilj stuff.
  350.  
  351.  
  352. QUESTION: What's about LILO ?
  353.  
  354. ANSWER: (Werner Almesberger)
  355. LILO  -  Generic Boot Loader for Linux ("LInux LOader")
  356.  
  357. This is an ALPHA test release of a new boot loader. Be sure to have
  358. some means to boot your system from a different media if you install
  359. LILO on your hard disk.
  360.  
  361. Features
  362. --------
  363.  
  364. - does not depend on the file system. (Tested with Minix, EXT FS and MS-DOS
  365.   FS.)
  366. - can be used to boot from floppies and from hard disks.
  367. - can replace the master boot record.
  368. - can boot non-Linux systems (MS-DOS, DR DOS, OS/2, ...) and unstripped
  369.   kernels.
  370. - supports up to 16 different boot images that can be selected at boot
  371.   time. Root and swap disk/partition can be set independently for each
  372.   image.
  373. - boot sector, file map and boot images can be all on different disks or
  374.   partitions.
  375.  
  376.  
  377. Restrictions and known problems
  378. -------------------------------
  379.  
  380. - SCSI disks are not fully supported yet. (Still waiting for some kernel
  381.   changes.)
  382. - booting other operating systems doesn't seem to work everywhere. If
  383.   everything but booting a non-Linux OS from LILO works on your system,
  384.   you should boot LILO by BOOTACTV and select the alternate OS with the
  385.   latter as a temporary work-around.
  386. - booting non-Linux systems from the second hard disk ("D:") is not yet
  387.   supported.
  388.  
  389. Please send all bug reports to almesber@nessie.cs.id.ethz.ch
  390.  
  391.  
  392. QUESTION: What's about MGR ?
  393.  
  394. ANSWER: (General Information grabbed from various sources)
  395. There is a MGR channel available , contact the request adress with
  396. help in the body: linux-activists-request@niksula.hut.fi
  397. The stuff can be found at banjo in pub/Linux/MGR
  398. In brief:
  399.  
  400. MGR provides:
  401.     - multiple overlapping windows
  402.     - multiple fonts
  403.     - text and graphics in each windows
  404.     - a simple popup menu package
  405.     - a client/server model 'a la' X
  406.     - independance from any peculiar networking technology
  407.  
  408. MGR consist of a server process and some clients. Each client has his
  409. own window, and can create subwindows. Clients communicate with the
  410. server via a bidirectionnal channel. A C library is provided.
  411.  
  412. When a new window starts, it is as a terminal emulator running the
  413. shell; for more information you can grab the mgr-man.out from
  414. bellcore.com
  415.  
  416.  
  417. QUESTION: I have successfully compiled MGR, but when I try to run the
  418. program I get "can't find mouse" or "already in use", any clue?
  419.  
  420. ANSWER: try the following "mgr -m /dev/ttys1" if the mouse is on
  421. the serial 1. Another possibility is to link /dev/mouse with
  422. /dev/ttys1 (assuming your mouse is on serial 1). Or if it's a bus
  423. mouse, "mknod /dev/mouse c 10 0" once.
  424.  
  425. QUESTION: Any tips for MGR?
  426.  
  427. ANSWER: Well, I have tried it on my 386Sx Ega/Vga; the screen is Ok
  428. but the Logitech mouse I have is not well recognized.
  429.  
  430. BTW check the major/minor number for pty's; they should be character
  431. device with 4 as major and 128 and bigger as minor:
  432. ptyp0 c 4 128
  433. ptyp1 c 4 129
  434. ...
  435. ttyp0 c 4 192
  436. ttyp1 c 4 193
  437.  
  438. QUESTION: What's about X11 ?
  439.  
  440. ANSWER: See the section devoted to X11 in this FAQ.
  441.  
  442.  
  443. IX. GCC MISC INFORMATION
  444. ========================
  445.  
  446. The official release of GCC for Linux is 2.2.2d, information for the
  447. previous versions (1.37, 1.40) can be found in FAQ of July 92.
  448.  
  449. I think this section is needed, 'cause a) gcc is the compiler under
  450. Linux, and b) the gcc-2.x is still evolving, and many information change
  451. constantly.
  452. To conclude this short introduction (in fact the conclusion will be
  453. longer than the introduction :), the most recent release of gcc-2.2.2d
  454. can be found at tsx-11 in /pub/linux/GCC, and also at
  455. fgb1.fgb.mw.tu-muenchen.de under /pub/linux/GCC, and one of the
  456. "specialist" is Hongjiu Lu (hlu@eecs.wsu.edu). There is a special
  457. channel for GCC, feel free to contact the linux-activists list.
  458. The Information provided in this section which envolved GCC2.xx
  459. are extracted from the FAQ GCC, written by Hongjiu, provided
  460. with the current distribution of gcc /READ IT/
  461. Finally whenever you report a bug please give the version of gcc, the
  462. version of your kernel, otherwise NO ONE can help you.
  463.  
  464.  
  465. QUESTION: I don't know how to install gcc stuff, is there special
  466. places?
  467.  
  468. ANSWER: gcc-2.xx is splitted in 3 main files 2.xxdb.tar.Z,
  469. 2.xxlib.tar.Z and 2.xxmisc.tar.Z, some utilities (binutils.tar.Z) and
  470. shared libraries are also provided. To install them do the following:
  471.  
  472. First of all, backup the old compiler. YOU MUST BE SURE THERE IS NO
  473. OTHER C COMPILER INSTALLED ON YOUR SYSTEM. What is meant by compiler
  474. is all the stuff: binaries, header files, libraries and crt0.o. I
  475. assume that whateverplace contains the 2.xxfiles you have downloaded.
  476.  
  477. cd /usr
  478. tar xvpzf whateverplace/2.xxmisc.tar.Z
  479.  
  480. read the FAQ, and README in /usr/install/gcc2.
  481.  
  482.  
  483. QUESTION: What are the contents of them?
  484.  
  485. ANSWER: 2.xxdb.tar.Z contains cpp, libg.a and libc_p.a. 2.xxlib.tar.Z
  486. contains cc1 and cc1plus. 2.xxmisc.tar.Z contains gcc 2.xx drivers,
  487. header files, libraries, manual pages and installation instructions.
  488. Another file, XXXXinc.tar.Z, where XXXX is the current version number
  489. of Linux kernel, has all the header files to replace the header files
  490. from kernel. YOU MUST INSTALL IT. Please read README for details.
  491.  
  492. (gcc.2.2.2d 08/15/92)
  493. 1. 2.2.2ddb.tar.Z (libg.a, libc_p.a and jump stable stuffs)
  494.    You just have to install jump/lib*.so.* by hand.
  495. 3. 2.2.2dg1.tar.Z (libg.a compiled with -g1 to get a smaller libg.a)
  496. 4. 2.2.2dfix4.tar.Z (<time.h>, <limits.h>,  <unistd.h>, libc.a and
  497.    shared/*.a)
  498. 5. shlib-2.2.2d.tar.Z (build the stub libs for the shared libs.)
  499. 6. libc-2.2.2dfix4.tar.Z. It has the following files:
  500.  
  501.     ./posix/sysconf.c
  502.  
  503. You need to delete by hand libinet.a in
  504.     /usr/lib/gcc-lib/i386-linux/2.2.2d
  505.  
  506.  
  507.  
  508. QUESTION: I seem to be unable to compile anything with gcc. Why?
  509.  
  510. ANSWER: If you have only 2 MB RAM, gcc will die silently without
  511. compiling anything. You must have at least 4 MB to do compilations
  512.  
  513. BTW Since swapping is possible, I have heard that compilation works
  514. with only 2Meg and a lot disk traffic :) Isn't it great?
  515.  
  516.  
  517. QUESTION: gcc complains about not finding crt0.o and the system
  518. include files What am I doing wrong ?
  519.  
  520. ANSWER: The include files normal place is in /usr/include. lib*.a and
  521. *.o should be in /usr/lib or /usr/local/lib
  522.  
  523.  
  524. QUESTION: I tried to port a /new/ version of gnu stuff. But in the
  525. linking phase, gcc complains about the missing libg.a.
  526.  
  527.  
  528. ANSWER: Yes this is well known for compiler version earlier than
  529. 2.2.2, throw away the flag -g that's all, anyway libg.a is /only/ for
  530. debugging purpose.
  531.  
  532.  
  533. QUESTION: How to compile programs which may be debugged with gdb?
  534.  
  535. ANSWER: There are different ways to handle this problem. If
  536. you have the gcc2.2.2 or later it's simple, use the -g flag. Otherwise
  537. there are different possibilities:
  538. 1) As there is no libg.a, you should throw away the -g flag in link
  539. phase, this means that the compilation must be done in two steps
  540. example: instead of "gcc -g monprog.c -o monprog", use the following
  541. "gcc -g -c monprog.c" and then "gcc -o monprog monprog.o"
  542. Alas this method is not that good if you are using Makefile.
  543. 2) The other way is to create an empty libg.a as follows (Peter
  544. Macdonald trick):
  545. - create libfake.c containing libgfake() {}
  546. - compile it with: gcc -c libfake.c
  547. - create the libg.a with: ar r libg.a libfake.o
  548. 2bis) The more tricky Humberto method:
  549. cd /usr/lib
  550. ranlib libg.a
  551.  
  552. then gcc -g monprog.c -o monprog will produce a debuggable monprog
  553.  
  554.  
  555. QUESTION: When compiling some code, cc1 complains about some insn
  556. code, what's that?
  557.  
  558. ANSWER: An insn is an internal representation that gcc uses when
  559. compiling. The main part of gcc is to take ordinary c (or c++) code,
  560. and compile it, while ding optimizations in insn part, which is
  561. soft/hard independant. Then another part which is hard/Os dependant
  562. takes the insns and translate it in assembly language. The fix is only
  563. to turn off the optimization flag (-O).
  564.  
  565.  
  566. QUESTION: While compiling some stuff, I'm getting the following
  567. error message:
  568. Undefined symbol ___addsf3 referenced from text segment
  569. as well as ___mulsf3 and __cmpsf2.
  570. These symbols are not in the program or in it's header files.
  571.  
  572. ANSWER: These are math helper functions, and you can usually compile
  573. these programs to use the kernel floating point routines by adding
  574. '-m80387' to the compiler switches. If the program does any wierd
  575. fp math (exp(), sin()) it'll die when you run it though.
  576.  
  577.  
  578.  
  579. QUESTION What's about gcc2.x ?
  580.  
  581. ANSWER: It has been ported to linux, it is (pretty) stable and works.
  582. The files are 2.xxlib.tar.Z and 2.xxmisc.tar.Z Uncompress and untar
  583. 2.xxmisc, read the FAQ enclosed and play with it.  You can find these
  584. files at tsx-11 in binaries/compilers/gcc-2.x. One of the most recent
  585. version is on tsx-11 and fgb1.    
  586. The shlib.tar.Z enables you to create shared libraries, read the
  587. README file included
  588. The 096inc.tar.Z contains the header files from the kernel
  589.  
  590.  
  591. QUESTION: I can't run g++ due to the lack of "expr"; where can I find
  592. it ?
  593.  
  594. ANSWER: In the shellutils-1.6.tar.Z (or whatever is the last release)
  595. on prep.ai.mit.edu
  596.  
  597. QUESTION: I have grabbed the new gcc2.xx, but I can't use it whenever
  598. I compile (even hello world program) I get "parse error before ('s";
  599. any clue ?
  600.  
  601. ANSWER: Yes, it's caused by bad compress/tar binaries, use the one
  602. provided at tsx-11 in linux/binaries/usr.bin
  603.  
  604. QUESTION: Is there a bug in how g++ and gcc handle include files?
  605. 'cause I can't get them to find files in the g++-include directory.
  606.  
  607. ANSWER: Did you run "fixfiles"? The file permission in g++-include is
  608. 640 and should be 444.
  609.  
  610.  
  611. QUESTION: I've seen on my ftp-server that there are different
  612. ***fix*.tar.Z files in the GCC directory, do I need them?
  613.  
  614. ANSWER: If you got a very early copy of gcc 2.2.2, please get
  615. 2.2.2fix1.tar.Z and 2.2.2fix2.tar.Z, and libc-linux.fix.tar.Z for the
  616. C lib sources, and new shlib-2.2.2.tar.Z if you want. If you got gcc
  617. 2.2.2 after you saw **fix*.tar.Z, you are fine.
  618.  
  619. QUESTION: Is stdio ANSI compatible?
  620.  
  621. ANSWER: Yes, please test it.
  622.  
  623. QUESTION: Is g++ in 2.xx?
  624.  
  625. ANSWER: Yes.
  626.  
  627. QUESTION: How do I use gcc?
  628.  
  629. ANSWER: Read manual page, gcc.ps or gcc.man in /usr/install/gcc2.
  630.  
  631. QUESTION: What options can I use for gcc?
  632.  
  633. ANSWER: Read manual page, gcc.ps or gcc.man. Also -static tells gcc
  634. to use the static libraries, -nojump forces gcc to use the classic
  635. shared libraries. The default is the jump table version of shared
  636. libraries. The shared libraries for X are linked with the jump table
  637. version of shared C library.
  638.  
  639. QUESTION: Where is the source code of the new libc.a?
  640.  
  641. ANSWER: The same place you find this file. It is called
  642. lib-src-yy.xx.TZ.
  643.  
  644. QUESTION: Why does g++ complain, even die?
  645.  
  646. ANSWER: You need "expr", which is in GNU shell utilities 1.6, echo (?)
  647. and sed.
  648.  
  649. QUESTION: How do I generate code for 486?
  650.  
  651. ANSWER: Add -m486 to CFLAGS.
  652.  
  653. QUESTION: I heard malloc (0) wouldn't work with Linux, what should I
  654. do?
  655.  
  656. ANSWER: include <stdlib.h> and don't define NO_FIX_MALLOC.
  657.  
  658. QUESTION: Why does gcc say "xxxxx..h not found"?
  659.  
  660. ANSWER: see QUESTION: What are the contents of them?
  661.  
  662. QUESTION: I really followed every step in the documentation, but when
  663. I do "make", why does it say "don't how to make xxxxxx"?
  664.  
  665. ANSWER: The dependency in Makefile is dated, you need to make a new
  666. one. Please get some guide on make and read Makefile. For the kernel
  667. sources, please do
  668.  
  669. cd src/linux
  670. make dep
  671.  
  672. QUESTION: How do I compile programs under Linux?
  673.  
  674. ANSWER: The Linux C library is trying to be ANSI/POSIX compliant. It
  675. is also very compatible with SYSV and BSD. The C library is loaded
  676. with SYSV and BSD functions. There are three exceptions:
  677.  
  678. 1. signal in Linux is POSIX.
  679. 2. tty in Linux is POSIX.
  680. 3. time functions are POSIX, plus a few BSD and SYSV extensions.
  681. 4. setjmp/longjmp functions are POSIX. But you can use -D__FAVOR_BSD
  682.    to make it BSD or use sigsigjmp/siglongjmp.
  683.  
  684. When you compile a program under Linux, your best bet is include all
  685. the appropriate header files and use -Wall. All the usable functions
  686. and global variables are declared in the corresponding header files.
  687. YOU SHOULD NOT DEFINE ANY functions or global variables OF THE LINUX C
  688. LIBRARY IN YOUR CODE IF YOU WANT TO USE THE SHARED LIBRARIES.
  689.  
  690. After saying all those, you now should know you can compile a program
  691. with -D_POSIX_SOURCE or -D_GNU_SOURCE (read <features.h> for details).
  692. With a few modifications you can even use -DSYSV, -DUSG or -DBSD. Some
  693. codes need to define -DSTDC_HEADERS for ANSI C compiler like gcc here.
  694.  
  695. To use malloc () and calloc () safely under Linux, please include
  696.  
  697. <stdlib.h> and don't define NO_FIX_MALLOC.
  698.  
  699. BTW, gcc -traditional should work with gcc 2.2.2d or above.
  700.  
  701. Please also read ChangeLog for the latest enhencement.
  702.  
  703. Please read the header files for details. Maybe you should get a book
  704. on POSIX. Any suggestion of the book list?
  705.  
  706. QUESTION: When compiling #$@!, I've got some problems with "SIGBUS"
  707. signal that doesn't exist. Any clue ?
  708.  
  709. ANSWER: (Louis J. LaBash, Jr.) SIGBUS is a common problem, its not
  710. needed, just comment it all out, something like:
  711.  
  712. #ifdef SIGBUS
  713. .. normal sigbus code ..
  714. #endif
  715.